package com.sqx.modules.disease.utils;

import com.sqx.modules.disease.vo.MapDataVO;
import org.apache.commons.collections.map.HashedMap;

import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author likk
 * @create 2023-11-24 16:10
 */
public class ChangLiangChi {

    //病症
    public static  final Map<String,String> DISEASE_MAP=new HashedMap();
    //阴阳
    public static  final Map<String,String> PRESCRIPT_MAP=new HashedMap();
    //脏腑
    public static  final Map<String,String>  VISCERA_MAP=new HashedMap();
    //闻诊
    public static  final Map<String,String>  SMELL_MAP=new HashedMap();
    //问诊
    public static  final Map<String,String>  DIAGNOED_MAP=new HashedMap();
    //面诊
    public static  final Map<String,String>  SUR_MAP=new HashedMap();
    //舌诊
    public static  final Map<String,String>  TONGUE_MAP=new HashedMap();
    //脉诊
    public static  final Map<String,String>  PULE_MAP=new HashedMap();

    //202301001--202301999 是病症id范围
    //202302001--202302999 是阴阳id范围
    //202303001--202303999 是脏腑id范围
    //202304001--202304999 是闻诊id范围
    //202305001--202305999 是问诊id范围
    //202306001--202306999 是面诊id范围
    //202307001--202307999 是舌诊id范围
    //202308001--202308999 是脉诊id范围
    public static  final Map<String, List<MapDataVO>>  DATA_MAP=new HashedMap();



    static {
        DIAGNOED_MAP.put("202305001","口渴多饮");
        DIAGNOED_MAP.put("202305002","易饥多食");
        DIAGNOED_MAP.put("202305003","小便次数多，每次量少");
        DIAGNOED_MAP.put("202305004","口舌生疮（有溃疡）");
        DIAGNOED_MAP.put("202305005","口有秽臭（口有异味，口臭）");
        DIAGNOED_MAP.put("202305006","牙龈出血");
        DIAGNOED_MAP.put("202305007","小便骚味大");
        DIAGNOED_MAP.put("202305008","小便发黄");
        DIAGNOED_MAP.put("202305009","失眠多梦");
        DIAGNOED_MAP.put("202305010","心悸怔忡");
        DIAGNOED_MAP.put("202305011","心神烦乱");
        DIAGNOED_MAP.put("202305012","小便短赤");
        DIAGNOED_MAP.put("202305013","潮热盗汗");
        DIAGNOED_MAP.put("202305014","腰酸");
        DIAGNOED_MAP.put("202305015","耳鸣");
        DIAGNOED_MAP.put("202305016","阳萎早泄");
        DIAGNOED_MAP.put("202305017","五心烦热");
        DIAGNOED_MAP.put("202305018","急躁易怒");
        DIAGNOED_MAP.put("202305019","头晕头痛");
        DIAGNOED_MAP.put("202305020","面红耳赤");
        DIAGNOED_MAP.put("202305021","口渴口苦");
    }
    static {
        TONGUE_MAP.put("202307001","舌红");
        TONGUE_MAP.put("202307002","舌苔黄");
    }
    static {
        PULE_MAP.put("202308001","脉滑");
        PULE_MAP.put("202308002","脉数");
        PULE_MAP.put("202308003","脉弦滑");
    }
    static {
        DISEASE_MAP.put("202301001","糖尿病");
        DISEASE_MAP.put("202301002","心脏病");
    }
    static {

        PRESCRIPT_MAP.put("202302001","阴虚热盛");
        PRESCRIPT_MAP.put("202302002","阳虚热盛");
    }
    static {

        VISCERA_MAP.put("202303001","肺胃热盛");
        VISCERA_MAP.put("202303002","胃火炽盛");
        VISCERA_MAP.put("202303003","心火上炎");
    }
    static {

        DATA_MAP.put("DIAGNOED_MAP",DIAGNOED_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
        DATA_MAP.put("VISCERA_MAP",VISCERA_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
        DATA_MAP.put("PRESCRIPT_MAP",PRESCRIPT_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
        DATA_MAP.put("DISEASE_MAP",DISEASE_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
        DATA_MAP.put("PULE_MAP",PULE_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
        DATA_MAP.put("TONGUE_MAP",TONGUE_MAP.entrySet().stream().sorted(Comparator.comparing(e -> e.getKey()))
                .map(e -> new MapDataVO(e.getKey(), e.getValue())).collect(Collectors.toList()));
    }
}
